]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Use points for font sizes
authorOwen W. Taylor <otaylor@fishsoup.net>
Fri, 4 Mar 2011 20:54:19 +0000 (15:54 -0500)
committerOwen W. Taylor <otaylor@fishsoup.net>
Tue, 15 Mar 2011 16:01:40 +0000 (12:01 -0400)
Do a basic job of converting font sizes from pixels to points, so they
will scale will the global GNOME scale factor. Some other sizes that are
clearly related to the font sizes are changed to ems, but no comprehensive
attempt is made to get rid of px units.

https://bugzilla.gnome.org/show_bug.cgi?id=636868

data/theme/gnome-shell.css
js/ui/overview.js
js/ui/panel.js
js/ui/workspace.js

index 1335e840507ee9afc216eac22747f02242ca6ebf..fac0006e02fa0324b4408b93fb7aeb09863249eb 100644 (file)
@@ -98,7 +98,7 @@ StTooltip StLabel {
 
 .popup-menu {
     color: #ffffff;
-    font-size: 14px;
+    font-size: 10.5pt;
     min-width: 200px;
 }
 
@@ -183,6 +183,8 @@ StTooltip StLabel {
     color: #ffffff;
     background-color: black;
     border-image: url("panel-border.svg") 1;
+    font-size: 10.5pt;
+    height: 1.86em;
 }
 
 #panelLeft, #panelCenter, #panelRight {
@@ -242,7 +244,6 @@ StTooltip StLabel {
 
 .panel-button {
     padding: 0px 12px;
-    font-size: 14px;
     font-weight: bold;
     color: #ccc;
     transition-duration: 100;
@@ -345,7 +346,7 @@ StTooltip StLabel {
     background: rgba(0,0,0,0.8);
     border: 1px solid rgba(128,128,128,0.40);
     border-radius: 10px;
-    font-size: 12px;
+    font-size: 9pt;
     padding: 2px 8px;
     -shell-caption-spacing: 4px;
 }
@@ -365,7 +366,7 @@ StTooltip StLabel {
 
 #dash {
     color: #5f5f5f;
-    font-size: 12px;
+    font-size: 9pt;
     padding: 4px 0px;
     background-color: rgba(0, 0, 0, 0.5);
     border: 1px solid rgba(128, 128, 128, 0.4);
@@ -391,12 +392,12 @@ StTooltip StLabel {
 }
 
 #viewSelector {
-    spacing: 16px;
-    font-size: 16px;
+    spacing: 1em;
+    font-size: 12pt;
 }
 
 #viewSelectorTabBar {
-    padding: 16px;
+    padding: 1em;
 }
 
 #searchArea {
@@ -444,8 +445,8 @@ StTooltip StLabel {
 .view-tab-title {
     color: #888a85;
     font-weight: bold;
-    padding: 0px 12px;
-    height: 24px;
+    padding: 0px 0.75em;
+    height: 1.5em;
 }
 
 .view-tab-title:hover {
@@ -455,8 +456,7 @@ StTooltip StLabel {
 .view-tab-title:selected {
     color: #000000;
     background-color: #c2c7cd;
-    border-radius: 4px;
-    height: 24px;
+    border-radius: 0.25em;
 }
 
 #searchResults {
@@ -519,7 +519,7 @@ StTooltip StLabel {
 
 .dash-search-button-label {
     color: #cccccc;
-    font-size: 16px;
+    font-size: 12pt;
 }
 
 /* Apps */
@@ -544,9 +544,9 @@ StTooltip StLabel {
 }
 
 .app-filter {
-    font-size: 14px;
+    font-size: 10.5pt;
     font-weight: bold;
-    height: 40px;
+    height: 2.85em;
     color: #aaa;
     width: 200px;
 }
@@ -589,7 +589,7 @@ StTooltip StLabel {
     border-radius: 4px;
     padding: 3px;
     border: 1px rgba(0,0,0,0);
-    font-size: 10px;
+    font-size: 7.5pt;
     color: white;
     transition-duration: 100;
     text-align: center;
@@ -619,7 +619,7 @@ StTooltip StLabel {
 }
 
 .app-well-menu {
-    font-size: 12px
+    font-size: 9pt;
 }
 
 /* LookingGlass */
@@ -775,7 +775,7 @@ StTooltip StLabel {
 
 .calendar-month-label {
     color: #666666;
-    font-size: 10px;
+    font-size: 7.5pt;
     padding: 2px;
     font-weight: bold;
 }
@@ -818,16 +818,16 @@ StTooltip StLabel {
 
 .datemenu-date-label {
     padding: .4em 1.75em;
-    font-size: 14px;
+    font-size: 10.5pt;
     color: #cccccc;
     font-weight: bold;
 }
 
 .calendar-day-base {
-    font-size: 10px;
+    font-size: 7.5pt;
     text-align: center;
-    width: 24px;
-    height: 24px;
+    width: 2.4em;
+    height: 2.4em;
 }
 
 .calendar-day-base:hover {
@@ -897,7 +897,7 @@ StTooltip StLabel {
 }
 
 .events-day-header {
-    font-size: 12px;
+    font-size: 9pt;
     font-weight: bold;
     color: rgba(153, 153, 153, 1.0);
     padding-left: 0.3em;
@@ -909,7 +909,7 @@ StTooltip StLabel {
 }
 
 .events-day-dayname {
-    font-size: 12px;
+    font-size: 9pt;
     color: rgba(153, 153, 153, 1.0);
     text-align: left;
 }
@@ -919,7 +919,7 @@ StTooltip StLabel {
 }
 
 .events-day-time {
-    font-size: 12px;
+    font-size: 9pt;
     color: #fff;
     text-align: right;
 }
@@ -929,7 +929,7 @@ StTooltip StLabel {
 }
 
 .events-day-task {
-    font-size: 12px;
+    font-size: 9pt;
     color: rgba(153, 153, 153, 1.0);
 }
 
@@ -964,7 +964,7 @@ StTooltip StLabel {
 }
 
 #notification {
-    font-size: 16px;
+    font-size: 12pt;
     border-radius: 5px 5px 0px 0px;
     background: rgba(0,0,0,0.9);
     padding: 8px 8px 4px 8px;
@@ -993,7 +993,7 @@ StTooltip StLabel {
 }
 
 .summary-boxpointer #summary-right-click-menu {
-    font-size: 14px;
+    font-size: 10.5pt;
     padding-top: 12px;
     padding-bottom: 12px;
 }
@@ -1095,7 +1095,7 @@ StTooltip StLabel {
 .chat-meta-message {
     padding-left: 4px;
     border-radius: 4px;
-    font-size: 14px;
+    font-size: 10.5pt;
     color: #bbbbbb;
 }
 
@@ -1163,7 +1163,7 @@ StTooltip StLabel {
 }
 
 .source-title {
-    font-size: 12px;
+    font-size: 9pt;
     font-weight: bold;
     padding-left: 4px;
 }
@@ -1185,7 +1185,7 @@ StTooltip StLabel {
     border-radius: 24px;
     padding: 20px;
 
-    font-size: 12px;
+    font-size: 9pt;
     color: white;
 }
 
@@ -1317,7 +1317,7 @@ StTooltip StLabel {
 .modal-dialog-button {
     border: 1px solid #8b8b8b;
     border-radius: 18px;
-    font-size: 14px;
+    font-size: 10.5pt;
 
     margin-left: 10px;
     margin-right: 10px;
@@ -1350,12 +1350,12 @@ StTooltip StLabel {
 
 /* Run Dialog */
 .run-dialog-label {
-    font-size: 12px;
+    font-size: 9pt;
     color: white;
 }
 
 .run-dialog-error-label {
-    font-size: 12px;
+    font-size: 9pt;
     color: white;
 }
 
@@ -1365,9 +1365,9 @@ StTooltip StLabel {
 }
 
 .run-dialog-entry {
-    font-size: 14px;
+    font-size: 10.5pt;
     font-weight: bold;
-    width: 320px;
+    width: 23em;
     color: white;
 }
 
index 18f0c0f851e45de5b2c60e868d1b6dc9c5d3f26c..3bb478923fead1061b74329adbdef80c72a83675 100644 (file)
@@ -439,7 +439,7 @@ Overview.prototype = {
         let primary = global.get_primary_monitor();
         let rtl = (St.Widget.get_default_direction () == St.TextDirection.RTL);
 
-        let contentY = Panel.PANEL_HEIGHT;
+        let contentY = Main.panel.actor.height;
         let contentHeight = primary.height - contentY - Main.messageTray.actor.height;
 
         this._group.set_position(primary.x, primary.y);
index 79376199c9146bffcfc33f8d696bf325391c6671..da27f6fbe88c5d1ddf28de8532f8f371f3315857 100644 (file)
@@ -22,8 +22,6 @@ const DateMenu = imports.ui.dateMenu;
 const Main = imports.ui.main;
 const Tweener = imports.ui.tweener;
 
-const PANEL_HEIGHT = 26;
-
 const PANEL_ICON_SIZE = 24;
 
 const STARTUP_ANIMATION_TIME = 0.2;
@@ -1044,7 +1042,7 @@ Panel.prototype = {
         let primary = global.get_primary_monitor();
 
         this.actor.set_position(primary.x, primary.y);
-        this.actor.set_size(primary.width, PANEL_HEIGHT);
+        this.actor.set_size(primary.width, -1);
 
         this._leftCorner.relayout();
         this._rightCorner.relayout();
index 9a80f8c8e18402e217ee4e6ad99fae025ec6fa32..82dbcb0872ec24cab1550a7870290559a7a3b353 100644 (file)
@@ -222,7 +222,7 @@ WindowClone.prototype = {
         let [width, height] = this.actor.get_transformed_size();
 
         this.actor.x = _clamp(this.actor.x, 0, global.screen_width  - width);
-        this.actor.y = _clamp(this.actor.y, Panel.PANEL_HEIGHT, global.screen_height - height);
+        this.actor.y = _clamp(this.actor.y, Main.panel.actor.height, global.screen_height - height);
     },
 
     _zoomStart : function () {